<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!--文本-->
        <input v-model="message" placeholder="请输入文字">
        <p>可见：{{message}}</p>
        <br>
        <!--多行文本-->  
        <textarea placeholder="可测试多行文字" v-model="message2"></textarea>
        <p>可见：</p>
        <p style=" white-space:pre-line">{{message2}}</p>
        <br>
        <!--复选框-->
        <!--单个复选框绑定布尔值-->
        <input type="checkbox" id="simpleTure"  v-model="simpleFalse" >
        <label for="simpleTure">显示：{{simpleFalse}}</label>
        <br>
        <!--多个复选框，绑到同一个数组-->
        <input type="checkbox" id="金" value="金" v-model="attributes">
        <label>金</label>
        <input type="checkbox" id="木" value="木" v-model="attributes">
        <label>木</label>
        <input type="checkbox" id="水" value="水" v-model="attributes">
        <label>水</label>
        <input type="checkbox" id="火" value="火" v-model="attributes">
        <label>火</label>
        <input type="checkbox" id="土" value="土" v-model="attributes">
        <label>土</label>
        <p>所选属性为：{{attributes}}</p>
        <br>
        <!--单选按钮-->
        <input type="radio" id="红" value="红" v-model="threeColor">
        <label for="红">红</label>
        <input type="radio" id="黄" value="黄" v-model="threeColor">
        <label for="黄">黄</label>
        <input type="radio" id="蓝" value="蓝" v-model="threeColor">
        <label for="蓝">蓝</label>
        <p>所选颜色为:{{threeColor}}</p>
        <br>
        <!--选择框-->
        <!--选择框单选时-->
        <select name="" id="" v-model="selected">
            <option value="" disabled>请选择</option>
            <option value="A">A</option>
            <option value="B">B</option>
            <option value="C">C</option>
            <option value="D">D</option>
        </select>
        <p>选择：{{selected}}</p>
        <br>
        <!--选择框多选时(绑定到一个数组)-->
        <select name="" id="" multiple style="width: 500px;" v-model="selected2">
            <option value="请选择" disabled >可选择</option>
            <option value="A">A</option>
            <option value="B">B</option>
            <option value="C">C</option>
            <option value="D">D</option>
        </select>
        <p>选择：{{selected2}}</p>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                message:'',
                message2:'',
                simpleFalse:'',
                attributes:[],
                threeColor:'',
                selected:'',
                selected2:[]
            }
        })
    </script>
</body>
</html>